package com.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;

import living.com.domain.User;
import lombok.*;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author 大忽悠
 * @since 2022年02月12日
 */
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Data
@TableName("issue_comment_response_grandson")
public class IssueCommentResponseGrandson implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 父评论id
     */
    private Integer fatherCommentId;

    /**
     * 孙子评论对应的用户id--为0表示是版主发布的
     */
    private Integer fromUserId;

    @TableField(exist = false)
    private String fromUsername;

    @TableField(exist = false)
    private String fromUserAvatar;

    /**
     * 回复儿子评论,toUserId为0
     * 回复同级孙子，toUser为回复孙子评论对应的用户的id
     * 回复同级子评论,回复对象为匿名对象,设置为-1
     */
    private Integer toUserId;

    /**
     * 回复匿名对象时,值为null
     */
    @TableField(exist = false)
    private String toUsername;


    /**
     * 内容
     */
    private String content;

    /**
     * 评论类型
     */
    private Integer type;

    /**
     * 是否逻辑删除
     */
    private Integer isDeleted;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

//    @TableField(exist = false)
//    private User publisher;

}
